package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface StudentMapper extends BaseMapper<Student> {

    //增加学生
    Integer saveStudent(Student student);

    //查找全部学生
    List<Student> selectStudents();

    //根据学号查询学生
    Student getStudentByStuId(@Param("stuId") Integer stuId);

    //根据学号删除学生
    Integer deleteStudentById(@Param("stuId") Integer stuId);

    //根据学号更新学生
    Integer updateStudent(Student student);


}
